package com.ethink.order.api;

import com.ethink.order.api.response.GroupMateDetailResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RequestParam;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.order.api.info.GroupMateInfo;
import com.ethink.order.api.request.GroupMateAddRequest;
import com.ethink.order.api.request.GroupMateQueryRequest;
import com.ethink.order.api.request.GroupMateUpdateRequest;
import com.ethink.order.api.response.GroupMateAddResponse;
import com.ethink.order.api.response.GroupMateDeleteResponse;
import com.ethink.order.api.response.GroupMateUpdateResponse;
import java.util.List;

/**
 * 组套商品表 Facade接口
 *
 * @author default
 * @date 2023-02-22
 */
@FeignClient(name = "ethink-order-service", path = "order-service/facade/v1/groupMate", contextId = "groupMateFacade")
public interface GroupMateFacade {

    @PostMapping("/queryGroupMate")
    @ResponseBody
    Page<GroupMateInfo> queryGroupMate(@RequestBody GroupMateQueryRequest request);

    @PostMapping("/getGroupMateById")
    @ResponseBody
    GroupMateDetailResponse getGroupMateById(@RequestParam("groupMateId") Long groupMateId);

    @PostMapping("/listGroupMate")
    @ResponseBody
    List<GroupMateInfo> listGroupMate(@RequestBody GroupMateQueryRequest request);

    @PostMapping("/addGroupMate")
    @ResponseBody
    GroupMateAddResponse addGroupMate(@RequestBody GroupMateAddRequest request);

    @PostMapping("/updateGroupMate")
    @ResponseBody
    Boolean updateGroupMate(@RequestBody GroupMateUpdateRequest request);

    @PostMapping("/deleteGroupMate")
    @ResponseBody
    boolean deleteGroupMate(@RequestParam("groupMateId") Long groupMateId);

    @PostMapping("/getGroupMateSkuList")
    @ResponseBody
    List<String> getGroupMateSkuList(@RequestParam("saleSubChannel") String saleSubChannel);

    @PostMapping("/getGroupMateByGroupMateSku")
    @ResponseBody
    GroupMateDetailResponse getGroupMateByGroupMateSku(@RequestParam("saleSubChannel") String saleSubChannel, @RequestParam("groupMateSku") String groupMateSku);
}